package suse.hotel.admin.admin.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class JumpController {
    @RequestMapping("/")
    public String init(HttpSession session){
        if (session.getAttribute("user")!=null)
        return "index";
        else
            return "login";
    }
    @RequestMapping("/welcome")
    public String welcome(){
        return "welcome";
    }
    @RequestMapping("/welcome1")
    public String welcome1(){
        return "welcome1";
    }

    @RequestMapping("admin-list")
    public String adminList(){
        return "admin-list";
    }
    @RequestMapping("admin-role")
    public String adminRole(){
        return "admin-role";
    }
    @RequestMapping("member-list")
    public String memberList(){
        return "member-list";
    }
    @RequestMapping("/member-edit")
    public String tomembEdit(){return "member-edit";}
    @RequestMapping("login")
    public String login(){
        return "login";
    }
}
